
import React, { Component } from 'react'
import styles from './index.scss'
import {fetchData} from '../AjaxConsumer'
import { Select } from 'antd';

export default class Page3 extends Component {
  constructor(props) {
      super(props);
      this.state = {
        optionList:[]
      };
  }
  componentDidMount() {
    let url = this.props.url;
    const options= {
        url: url+value,
        condition:{},
        type: 'get', 
      };
    fetchData(this.option,(res)=>{
      this.setState({
        optionList
      })
    })

  }
  render() {
    let optionList = this.state.optionList;
    return (
      <Select 
        placeholder="Please select" 
        onChange={this.handleSelectChange.bind(this,'selectmycao')} 
        disabled={false} 
        style={{height:'33px'}}
      >
        {optionList.map((ee,eIndex)=>{
                return (
                    <Option key={eIndex} value={ee.optionKey}>{ee.optionShow}</Option>
                )
            })
        }
      </Select>
    );
  }
}
